// number[]

let arr:number[] = [1,2,3,4,5,6,7,8,9,10];

// 泛型
// Array<number>
// 数组普通类型
let arr2:Array<number> = [1,2,3,4,5,6,7,8,9,10];

// 定义对象数组使用interface
interface Person {
  name: string
  age: number
}

let person:Person[] = [
  {
    name: '张三',
    age: 18
  },
  {
    name: '李四',
    age: 19
  }
]

// 二维数组
let arr3:number[][] = [[1,2,3],[4,5,6],[7,8,9]]
// 泛型
// Array<Array<number>>
let arr4:Array<Array<number>> = [[1,2,3],[4,5,6],[7,8,9]]
// 大杂烩数组
// any[]
let arr5:any[] = [1,2,3,4,5,6,7,8,9,10]
// 定义元祖 不可修改
let arr6:[number,string,boolean,null] = [1,'2',true,null]

function arrFn (...args:any[]) {
  console.log(args);
  let a:IArguments = arguments
  console.log(a);
}

arrFn(1,2,3,4,5)

interface newArguments {
  callee: Function
  length: number
  [index: number]: any
}

function arrFn02(...args: any[]) {
  console.log(args);
  let a: newArguments = arguments
  console.log(a);
}

arrFn02(1, 2, 3, 4, 5)